def name():
    print("欢迎使用本系统，输入quit退出，其他任意输入进行登记")
    line = input("请输入你的名字：")
    if line=='quit':
        exit(0)
    else:
        with open("guess.txt","a+",encoding="utf-8",buffering=1) as f:
            f.write(f"{line}\n")
            name()
name()
